<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
	*{
		padding: 0;
		margin: 0;
	}
	#mai{
		width: 976px;
		height: 296px;
		border: 5px solid blue;
		margin: 20px auto;
		background: black;
	}
	#mai img{
		float: left;
	}
</style>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
	$(function(){

		// 给所有的图片加鼠标移入事件
		$('#mai img').mouseover(function(){
			$(this).fadeTo(0,1).siblings('img').fadeTo(0,0.7);//让当前移入的元素的透明度变成1，它的兄弟元素透明度变为0.7
		})

		$('#mai').mouseout(function() {
			$('#mai img').fadeTo(0,1);
		});

	})
</script>
</head>

<body>

<div id="mai">
	<!-- img[src=images/$.jpg]*6 -->
	<img src="images/1.jpg" alt="" />
	<img src="images/2.jpg" alt="" />
	<img src="images/3.jpg" alt="" />
	<img src="images/4.jpg" alt="" />
	<img src="images/5.jpg" alt="" />

</div>

</body>
</html>
